const path = require('path');
const security = require('./config.security');
const permission = require('./config.permission');
const mysql = require('./config.mysql');
const cors = require('./config.cors');
const multipart = require('./config.multipart');

module.exports = appInfo => {

  const config = {};

  config.middleware = ['jwt'];
  config.security = security;
  config.permission = permission;
  config.mysql = mysql;
  config.cors = cors;
  config.multipart = multipart;
  config.multipart.tmpdir = path.join(appInfo.baseDir, 'tmp');

  return config;
};


